{extend name="public:common_index"/}
{block name="main"}
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i> 登陆日志</h3>
        </div>
        <div class="panel-body">
            <div class="navbar navbar-default">
                <form action="" id="search-form2" class="navbar-form form-inline" method="get" onsubmit="return false">
                    <div class="form-group">
                        <label class="control-label" for="input-order-id">标题</label>
                        <div class="input-group">
                            <input type="text" name="title" value="{$Think.get.title}" placeholder="标题"
                             class="form-control">
                        </div>
                    </div>
                    <button type="submit" onclick="javascript:document.getElementById('search-form2').submit();"
                            id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选
                    </button>
                    <!--<a href="{:url('examiner_batch')}" class="btn btn-primary pull-right"><i class="fa fa-folder-open-o"></i>批量导入</a>-->
                </form>
            </div>
            <div id="ajax_return">
                <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>id</td>
                                <td>登录用户id</td>
                                <td>登录账号</td>
                                <td>标题</td>
                                <td>访问地址</td>
                                <td>IP地址</td>
                                <td>操作时间</td>
                                <td>操作</td>
                            </tr>
                            </thead>
                            <tbody>
                            <!-- 列表循环开始 -->
                            {volist name="rows" id="row" key="key"}
                            <tr>
                                <td>{$row.id}</td>
                                <td>{$row.user_id}</td>
                                <td>{$row.user.user_name}</td>
                                <td>{$row.title}</td>
                                <td><a href="{$row.url}">{$row.url}</a></td>
                                <td>{$row.ip}</td>
                                <td>{$row.create_time}</td>
                                <td>
                                    <a class="btn btn-primary " onclick="openUrl('{:url('detail',['id'=>$row.id])}')">查看详情</a>
                                </td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div id='pagerarea'>{$pageHTML}</div>
        </div>
    </div>

<script>

    function openUrl(url) {
        layer.open({
            type: 2,
            title: '详情',
            shadeClose: true,
            shade: false,
            maxmin: true, //开启最大化最小化按钮
            area: ['80%', '80%'],
            content: url
        });
    }

</script>

{/block}





